import {RouteRecordRaw} from 'vue-router'

const modules = import.meta.globEager('./modules/**.ts')

export function autoloadRoute() {
  const routes: RouteRecordRaw[] = []
  Object.entries(modules).forEach(([key, value]) => {
    routes.push(value.default[0])
  })

  return routes
}
